package Example;

public class Test6 {
    public static void main(String[] args) {
        T t=new T2();
        t.print(1);
    }
}
class T{
    int[] a=new int[]{7,8,9};
    public void print(int i){
        System.out.println(a[i]);
    }
}
class T1 extends T{
    public T1(){
        this.a= new int[]{0, 1, 2};
    }
}
class T2 extends T{
    public T2(){
        this.a= new int[]{4,5,6};
    }
}
